package com.sec.android.app.myfiles.widget.listview;

import android.content.Context;
import android.view.View;

import com.sec.android.app.myfiles.R;
import com.sec.android.app.myfiles.module.abstraction.FileRecord;
import com.sec.android.app.myfiles.navigation.NavigationInfo;
import com.sec.android.app.myfiles.util.UiUtils;

public class DetailListViewImp extends AbsListViewImp {

    public DetailListViewImp(Context context, View parentView, NavigationInfo navigationInfo) {
        super(context, parentView, navigationInfo);
    }

    @Override
    protected int _getListLayoutId() {
        return R.id.detail_list;
    }

    @Override
    protected int _getItemLayoutId() {
        if (mNavigationInfo.getStorageType() == FileRecord.StorageType.Category) {
            FileRecord record = mNavigationInfo.getCurRecord();
            if (UiUtils.isCategoryFolderList(record) && !mNavigationInfo.isSinglePickerMode()) {
            /* only when 1 depth */
                return R.layout.file_detail_category_folder_list_item;
            }
        }
        return R.layout.file_detail_list_item;
    }

    @Override
    protected int _getViewStubId() {
        return R.id.detail_list_stub;
    }
}
